package org.openlvb.openlvp.main;


import org.openlvb.openlvp.OpenlvpApplication;
import org.openlvb.openlvp.calendar.CalendarPanel;
import org.openlvb.openlvp.mail.MailPanel;

import com.vaadin.terminal.ClassResource;
import com.vaadin.ui.HorizontalLayout;
import com.vaadin.ui.Label;
import com.vaadin.ui.SplitPanel;
import com.vaadin.ui.TabSheet;
import com.vaadin.ui.VerticalLayout;

public class WorkPanel extends VerticalLayout{
	
	private MailPanel mailPanel;
	private CalendarPanel calendarPanel;

	public WorkPanel(OpenlvpApplication openlvpApplication) {
		TabSheet tabsheet = new TabSheet();
		
		//Mail
		mailPanel = new MailPanel(openlvpApplication);
		tabsheet.addTab(mailPanel,
		"Mail",new ClassResource(WorkPanel.class, "images/mail-message-new.png", openlvpApplication));
		//Calendrier
		calendarPanel = new CalendarPanel();
		tabsheet.addTab(calendarPanel,
		"Calendrier",
		new ClassResource(WorkPanel.class, "images/x-office-calendar.png", openlvpApplication));
		//Tâches
		tabsheet.addTab(new Label("Liste des tâches"),
		"Tâches",
		new ClassResource(WorkPanel.class, "images/applications-system.png", openlvpApplication));
		//Contacts
		tabsheet.addTab(new Label("Liste des contacts"),
				"Contacts",
				new ClassResource(WorkPanel.class, "images/system-users.png", openlvpApplication));
		//Fichiers
		tabsheet.addTab(new Label("Liste des fichiers"),
				"Fichiers",
				new ClassResource(WorkPanel.class, "images/folder-saved-search.png", openlvpApplication));
		// Make the tabsheet shrink to fit the contents.
		tabsheet.setHeight("500px");
		addComponent(tabsheet);
		setSizeFull();
	}

}
